#!/usr/bin/env python
# coding=utf-8
# __author__ = 'Yunchao Ling'

import requests


def TestSEKAPI():
    url = 'http://10.10.118.188:735/metagenomics/api/services/add_result'
    payload = {"runId": "OED010924", "code": "OED010924", "date": "20180105", "libraryLayout": "single",
               "libraryStrategy": "wgs", "taxonomic": True, "function": True, "quality": True}
    r = requests.post(url, stream=True, data=payload)
    if r.status_code == 200:
        print(r.text)
    else:
        print("Web Error.")
        print(r.status_code)


if __name__ == '__main__':
    TestSEKAPI()
